.class Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;
.super Landroid/os/AsyncTask;
.source "ShowOnMapActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/android/footprints/activity/ShowOnMapActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "FootprintQueryTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Lcom/htc/android/footprints/vo/Category;",
        "Ljava/lang/Integer;",
        "Ljava/util/ArrayList",
        "<",
        "Lcom/htc/android/footprints/vo/Footprint;",
        ">;>;"
    }
.end annotation


# instance fields
.field private mManager:Lcom/htc/android/footprints/provider/FootprintManager;

.field final synthetic this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;


# direct methods
.method private constructor <init>(Lcom/htc/android/footprints/activity/ShowOnMapActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 592
    iput-object p1, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/htc/android/footprints/activity/ShowOnMapActivity;Lcom/htc/android/footprints/activity/ShowOnMapActivity$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 592
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;-><init>(Lcom/htc/android/footprints/activity/ShowOnMapActivity;)V

    return-void
.end method


# virtual methods
.method protected bridge synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter "x0"

    .prologue
    .line 592
    check-cast p1, [Lcom/htc/android/footprints/vo/Category;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->doInBackground([Lcom/htc/android/footprints/vo/Category;)Ljava/util/ArrayList;

    move-result-object v0

    return-object v0
.end method

.method protected varargs doInBackground([Lcom/htc/android/footprints/vo/Category;)Ljava/util/ArrayList;
    .locals 6
    .parameter "category"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "([",
            "Lcom/htc/android/footprints/vo/Category;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;"
        }
    .end annotation

    .prologue
    const/4 v5, 0x0

    .line 597
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->mManager:Lcom/htc/android/footprints/provider/FootprintManager;

    if-nez v3, :cond_0

    .line 598
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    invoke-virtual {v3}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3}, Lcom/htc/android/footprints/provider/FootprintManager;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/provider/FootprintManager;

    move-result-object v3

    iput-object v3, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->mManager:Lcom/htc/android/footprints/provider/FootprintManager;

    .line 607
    :cond_0
    if-eqz p1, :cond_2

    .line 608
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->mManager:Lcom/htc/android/footprints/provider/FootprintManager;

    const/4 v4, 0x0

    aget-object v4, p1, v4

    iget-object v4, v4, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    invoke-virtual {v3, v4, v5}, Lcom/htc/android/footprints/provider/FootprintManager;->findFootprintCursorByCategoryAndKeyword(Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    .line 611
    .local v0, cursor:Landroid/database/Cursor;
    new-instance v2, Ljava/util/ArrayList;

    invoke-interface {v0}, Landroid/database/Cursor;->getCount()I

    move-result v3

    invoke-direct {v2, v3}, Ljava/util/ArrayList;-><init>(I)V

    .line 613
    .local v2, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    :goto_0
    invoke-interface {v0}, Landroid/database/Cursor;->moveToNext()Z

    move-result v3

    if-eqz v3, :cond_1

    .line 614
    new-instance v1, Lcom/htc/android/footprints/vo/Footprint;

    invoke-direct {v1}, Lcom/htc/android/footprints/vo/Footprint;-><init>()V

    .line 615
    .local v1, footprint:Lcom/htc/android/footprints/vo/Footprint;
    invoke-static {v1, v0}, Lcom/htc/android/footprints/provider/FootprintManager;->fillDataFromCursor(Lcom/htc/android/footprints/vo/Footprint;Landroid/database/Cursor;)V

    .line 616
    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 618
    .end local v1           #footprint:Lcom/htc/android/footprints/vo/Footprint;
    :cond_1
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    move-object v3, v2

    .line 621
    .end local v0           #cursor:Landroid/database/Cursor;
    .end local v2           #result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    :goto_1
    return-object v3

    :cond_2
    move-object v3, v5

    goto :goto_1
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 592
    check-cast p1, Ljava/util/ArrayList;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->onPostExecute(Ljava/util/ArrayList;)V

    return-void
.end method

.method protected onPostExecute(Ljava/util/ArrayList;)V
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/htc/android/footprints/vo/Footprint;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 628
    .local p1, result:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/htc/android/footprints/vo/Footprint;>;"
    iget-object v0, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    iput-object p1, v0, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->mDataList:Ljava/util/ArrayList;

    .line 630
    iget-object v0, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    #getter for: Lcom/htc/android/footprints/activity/ShowOnMapActivity;->mMapOverlay:Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;
    invoke-static {v0}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->access$800(Lcom/htc/android/footprints/activity/ShowOnMapActivity;)Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 631
    iget-object v0, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    #getter for: Lcom/htc/android/footprints/activity/ShowOnMapActivity;->mMapOverlay:Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;
    invoke-static {v0}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->access$800(Lcom/htc/android/footprints/activity/ShowOnMapActivity;)Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;

    move-result-object v0

    invoke-virtual {v0}, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->populateData()V

    .line 633
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$FootprintQueryTask;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    #getter for: Lcom/htc/android/footprints/activity/ShowOnMapActivity;->mMapView:Lcom/google/android/maps/MapView;
    invoke-static {v0}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->access$600(Lcom/htc/android/footprints/activity/ShowOnMapActivity;)Lcom/google/android/maps/MapView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/google/android/maps/MapView;->invalidate()V

    .line 634
    return-void
.end method
